package com.zls.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import java.util.ArrayList;

@Configuration
@EnableSwagger2 //开启swagger
public class SwaggerConfig {

    @Bean
    public Docket docket(){
        return new Docket(DocumentationType.SWAGGER_2).apiInfo( new ApiInfo(
                "标题swagger接口文档",
                "描述:文档具体信息",
                "版本V1.0",
                "http//www.com.zls.com",
                new Contact("com.zls","www.com.zls.com","2539993128@qq.com"),
                "url","url",new ArrayList<>()));
    }
}
